import requests

headers ={
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
    'Referer':'https://www.bilibili.com/video/BV1PvtKeHELQ/?spm_id_from=333.1073.high_energy.content.click'
}

urls ='https://cn-jsnt-ct-01-10.bilivideo.com/upgcxcode/86/18/25653941886/25653941886-1-100022.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1726572253&gen=playurlv2&os=bcache&oi=0&trid=0000b63da8ee8d7c416782c4bc91878b0438u&mid=0&platform=pc&og=cos&upsig=fb0a04ff80417ffa211c69b31bf28beb&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform,og&cdnid=4280&bvc=vod&nettype=0&orderid=0,3&buvid=9C19BB61-E414-8381-03EA-ED9B9245B86503646infoc&build=0&f=u_0_0&agrr=1&bw=11015&logo=80000000'
urly ='https://cn-jsnt-ct-01-10.bilivideo.com/upgcxcode/86/18/25653941886/25653941886-1-30216.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1726572253&gen=playurlv2&os=bcache&oi=0&trid=0000b63da8ee8d7c416782c4bc91878b0438u&mid=0&platform=pc&og=hw&upsig=457d0c9448b780a15dafe4968be8bb8d&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform,og&cdnid=4280&bvc=vod&nettype=0&orderid=0,3&buvid=9C19BB61-E414-8381-03EA-ED9B9245B86503646infoc&build=0&f=u_0_0&agrr=1&bw=6784&logo=80000000'
with open('my_y.mp4','wb') as f:
    response = requests.get(url=urly, headers=headers)
    f.write(response.content)

with open('my_s.mp4','wb') as f:
    response = requests.get(url=urls, headers=headers)
    f.write(response.content)

